package com.atguigu.realtime.app.dws;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @auther yuzehua
 * @date 2022/10/28 - 13:59
 */
public class Test {
    public static void main(String[] args) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        try {
            Date date = sdf.parse("2022-10-27 14:42:47");
            long shootTime = date.getTime();
            System.out.println(shootTime);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }
}
